<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.8"/>
<title>embedme: ThreadPool类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">embedme
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.8 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li class="current"><a href="annotated.html"><span>类</span></a></li>
      <li><a href="files.html"><span>文件</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>类列表</span></a></li>
      <li><a href="classes.html"><span>类索引</span></a></li>
      <li><a href="hierarchy.html"><span>类继承关系</span></a></li>
      <li><a href="functions.html"><span>类成员</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="class_thread_pool-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">ThreadPool类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p>线程池  
 <a href="class_thread_pool.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="_thread_pool_8h_source.html">ThreadPool.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a44d3d2ab618970605e684efc216655eb"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_thread_pool.html#a44d3d2ab618970605e684efc216655eb">~ThreadPool</a> ()</td></tr>
<tr class="memdesc:a44d3d2ab618970605e684efc216655eb"><td class="mdescLeft">&#160;</td><td class="mdescRight">线程池析构函数  <a href="#a44d3d2ab618970605e684efc216655eb">更多...</a><br /></td></tr>
<tr class="separator:a44d3d2ab618970605e684efc216655eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aced6bffb36b2643b8d613d8f721b3229"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_thread_pool.html#aced6bffb36b2643b8d613d8f721b3229">init</a> (int <a class="el" href="class_thread_pool.html#a019eebc4dc6cfd41d2daca8843fc87c1">maxThreadCount</a>)</td></tr>
<tr class="memdesc:aced6bffb36b2643b8d613d8f721b3229"><td class="mdescLeft">&#160;</td><td class="mdescRight">线程池初始化  <a href="#aced6bffb36b2643b8d613d8f721b3229">更多...</a><br /></td></tr>
<tr class="separator:aced6bffb36b2643b8d613d8f721b3229"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab5318d91455431c868208c0ed37009dd"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_thread_pool.html#ab5318d91455431c868208c0ed37009dd">start</a> (<a class="el" href="class_runnable.html">Runnable</a> *runnable, int priority=0)</td></tr>
<tr class="memdesc:ab5318d91455431c868208c0ed37009dd"><td class="mdescLeft">&#160;</td><td class="mdescRight">启动线程  <a href="#ab5318d91455431c868208c0ed37009dd">更多...</a><br /></td></tr>
<tr class="separator:ab5318d91455431c868208c0ed37009dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a60016babe5c4af5155740972c9ea8910"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_thread_pool.html#a60016babe5c4af5155740972c9ea8910">cancel</a> (<a class="el" href="class_runnable.html">Runnable</a> *runnable)</td></tr>
<tr class="memdesc:a60016babe5c4af5155740972c9ea8910"><td class="mdescLeft">&#160;</td><td class="mdescRight">停止线程  <a href="#a60016babe5c4af5155740972c9ea8910">更多...</a><br /></td></tr>
<tr class="separator:a60016babe5c4af5155740972c9ea8910"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a019eebc4dc6cfd41d2daca8843fc87c1"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_thread_pool.html#a019eebc4dc6cfd41d2daca8843fc87c1">maxThreadCount</a> ()</td></tr>
<tr class="memdesc:a019eebc4dc6cfd41d2daca8843fc87c1"><td class="mdescLeft">&#160;</td><td class="mdescRight">返回当前线程池最大线程个数  <a href="#a019eebc4dc6cfd41d2daca8843fc87c1">更多...</a><br /></td></tr>
<tr class="separator:a019eebc4dc6cfd41d2daca8843fc87c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aafc6450a99262093d4b25319a20bc087"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_thread_pool.html#aafc6450a99262093d4b25319a20bc087">idleThreadCount</a> ()</td></tr>
<tr class="memdesc:aafc6450a99262093d4b25319a20bc087"><td class="mdescLeft">&#160;</td><td class="mdescRight">返回当前可用线程个数  <a href="#aafc6450a99262093d4b25319a20bc087">更多...</a><br /></td></tr>
<tr class="separator:aafc6450a99262093d4b25319a20bc087"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:a425d9481a69be20791ab1cc60e33c8ad"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a425d9481a69be20791ab1cc60e33c8ad"></a>
static <a class="el" href="class_thread_pool.html">ThreadPool</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>getInstance</b> ()</td></tr>
<tr class="separator:a425d9481a69be20791ab1cc60e33c8ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>线程池 </p>
</div><h2 class="groupheader">构造及析构函数说明</h2>
<a class="anchor" id="a44d3d2ab618970605e684efc216655eb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ThreadPool::~ThreadPool </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>线程池析构函数 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">none</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>none </dd></dl>

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a class="anchor" id="a60016babe5c4af5155740972c9ea8910"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ThreadPool::cancel </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_runnable.html">Runnable</a> *&#160;</td>
          <td class="paramname"><em>runnable</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>停止线程 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">runnable</td><td>线程运行体 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>成功返回true,失败返回false </dd></dl>

</div>
</div>
<a class="anchor" id="aafc6450a99262093d4b25319a20bc087"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ThreadPool::idleThreadCount </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>返回当前可用线程个数 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">none</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>线程个数 </dd></dl>

</div>
</div>
<a class="anchor" id="aced6bffb36b2643b8d613d8f721b3229"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ThreadPool::init </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>maxThreadCount</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>线程池初始化 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">maxThreadCount</td><td>最大线程个数 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>成功返回true,失败返回false </dd></dl>

</div>
</div>
<a class="anchor" id="a019eebc4dc6cfd41d2daca8843fc87c1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ThreadPool::maxThreadCount </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>返回当前线程池最大线程个数 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">none</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>线程个数 </dd></dl>

</div>
</div>
<a class="anchor" id="ab5318d91455431c868208c0ed37009dd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ThreadPool::start </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_runnable.html">Runnable</a> *&#160;</td>
          <td class="paramname"><em>runnable</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>priority</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>启动线程 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">runnable</td><td>线程运行体 </td></tr>
    <tr><td class="paramname">priority</td><td>线程运行优先级 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>成功返回true,失败返回false </dd></dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>libemb/inc/<a class="el" href="_thread_pool_8h_source.html">ThreadPool.h</a></li>
<li>libemb/src/ThreadPool.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
生成于 2016年 七月 7日 星期四 19:49:39 , 为 embedme使用  &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.8
</small></address>
</body>
</html>
